package cn.edu.zafu.bigdata.x.wupeng.g;

import java.io.*;
public class CopyBytes {
    public static void main(String[] args)  {
        File inputFile = new File("files/hello.txt");
        File outputFile = new File("files/world.txt");

        try {
            FileInputStream in = new FileInputStream(inputFile);
            FileOutputStream out = new FileOutputStream(outputFile);
            int c;
            while ((c = in.read())!=-1){
                out.write(c);
            }
            in.close();
            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }


    }
}
